package com.coffee.admin.service.supplier.dao;

import com.coffee.admin.api.supplier.query.SupplierRoleQuery;
import com.coffee.admin.service.supplier.bean.SupplierRole;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SupplierRoleDao {
	public SupplierRole findById(Integer id);
	
	public SupplierRole findByIdForUpdate(Integer id);
	
	public List<SupplierRole> findByIds(@Param("idList") List<Integer> idList);

	public Integer count(@Param("param") SupplierRoleQuery param);

	public List<SupplierRole> page(@Param("param") SupplierRoleQuery param, @Param("offset") Integer offset, @Param("rows") Integer rows);

	public SupplierRole findFirst(@Param("param") SupplierRoleQuery param);

	public Integer insert(SupplierRole param);

	Integer insertBatch(List<SupplierRole> list);

	public void updateById(@Param("param") SupplierRole param);
	
	public Integer deleteById(@Param("id") Integer id,@Param("supplierId") Integer supplierId);
	
	public Integer deleteByIds(List<Integer> idList);
	
}